<?php echo $this->render('/manage/header.phtml');?>
<style>
	#title, #keywords, #coverimage {
		width: 600px;
	}
</style>
</head>
<body>
	<div id="body-wrapper">
		<?php echo $this->render('/manage/sidebar.phtml');?>
		<div id="main-content">
			<h2><?php echo $this->id == 0 ? "添加模特生活" : "编辑模特生活";?></h2>
			<div class="clear"></div>
			<div class="content-box">
				<div class="content-box-header">
					<h3>Content box</h3>
					<div class="clear"></div>
				</div>
				<div class="content-box-content">
					<?php
					$joinTable = Zend_Registry::get('database')->modeljoin;
					$joinTableReverse = Zend_Registry::get('database')->modeljoinreverse;
					$joinChar = Zend_Registry::get('lang')->model->join;
					$model = $this->modelInfo;
					?>
					<p>
					<?php 
					foreach ($model as $key => $detail) {
                        $param = $joinTableReverse->$key;
                        if ($param == 'upload') {
                            $photos = unserialize($detail);
                            if (empty($photos)) {
                                $photos = array();
                            }
                            $char = $joinChar->$param;
                            echo $char . ' ：' . '<br />';
                            foreach ($photos as $photo) {
                                echo '<a href="' . $photo . '" target="_blank"><img width="100" height="100" src="' . $photo . '"></a>';
                            }
                            echo '<br />';
                        } else {
                            if ($param == 'id') {
                                $char = '模特id';
                            } elseif ($param == 'ctime') {
                                $char = '提交时间';
                            } else {
                                $char = $joinChar->$param;
                            }
                            echo $char . ' ：' . $detail . '<br />';
                        }
					}
					?>
					</p>
				</div>
			</div>
			<?php echo $this->render('/manage/footer.phtml');?>
		</div>
	</div>
</body>
</html>